/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.lottery.entity;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonUnwrapped;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 抽奖活动管理Entity
 * @author Muser
 * @version 2019-07-31
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Activity extends DataEntity<Activity> {
	
	private static final long serialVersionUID = 1L;
	@JsonUnwrapped
	private String openid;		// 微信用户唯一标识
	@JsonUnwrapped
	private String name;		// 活动名称
	@JsonUnwrapped
	private String image;		// 活动图片url
	@JsonUnwrapped
	private String detail;		// 详情介绍
	@JsonUnwrapped
	@JsonProperty("start_time")
	private Date startTime;		// 开始时间
	@JsonUnwrapped
	@JsonProperty("end_time")
	private Date endTime;		// 结束时间
	@JsonUnwrapped
	@JsonProperty("min_num")
	private Integer minNum;		// 参与人数限制
	@JsonUnwrapped
	private String statusId;		// 状态编码
	@JsonUnwrapped
	private String explanation;		// 状态解释
	@JsonUnwrapped
	private String formId;		// 形式编码
	
	public Activity() {
		super();
	}

	public Activity(String id){
		super(id);
	}

	@Length(min=0, max=64, message="微信用户唯一标识长度必须介于 0 和 64 之间")
	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}
	
	@Length(min=0, max=255, message="活动名称长度必须介于 0 和 255 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=0, max=255, message="活动图片url长度必须介于 0 和 255 之间")
	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}
	
	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
	
	public Integer getMinNum() {
		return minNum;
	}

	public void setMinNum(Integer minNum) {
		this.minNum = minNum;
	}
	
	@Length(min=0, max=64, message="状态编码长度必须介于 0 和 64 之间")
	public String getStatusId() {
		return statusId;
	}

	public void setStatusId(String statusId) {
		this.statusId = statusId;
	}
	
	@Length(min=0, max=255, message="状态解释长度必须介于 0 和 255 之间")
	public String getExplanation() {
		return explanation;
	}

	public void setExplanation(String explanation) {
		this.explanation = explanation;
	}
	
	@Length(min=0, max=64, message="形式编码长度必须介于 0 和 64 之间")
	public String getFormId() {
		return formId;
	}

	public void setFormId(String formId) {
		this.formId = formId;
	}
	
}